/*
 *shit_app.h
 *
 *  Created on: 2015-8-11 10:07:06
 *      Author: Administrator
 */

#ifndef SHIT_APP_H_
#define SHIT_APP_H_



#include "xparameters.h"
#include "stdio.h"
#include "xintc.h"
#include "xgpio.h"
#include "sysctl_config.h"



/**************** 2015-6-9 16:01:38 The following code is for HR-HT error elusion ****************/
#include "xtmrctr.h"
/****************** 2015-6-9 16:01:38 The upper code is for HR-HT error elusion ******************/



#define TIMER_COUNTER_0   0
#define RESET_VALUE       0x00000000



/**************** 2015-6-9 16:01:38 The following code is for HR-HT error elusion ****************/
#define HR_NO_ZHT_TIME        0x4A817C80
#define HR_ZHT_TIMES          2
#define HR_BOOT_OK_BIT        0              //Gpio_245o output bit definition
#define HR_SYS_RST_BIT        1              //Gpio_245o output bit definition
#define OTHER_BITS_VAL        ((0x4CFFF)<<2)

#define GPIO2_HR_BOOT_OK_BIT  9

#define FK_HR_DBG             1
/****************** 2015-6-9 16:01:38 The upper code is for HR-HT error elusion ******************/



/**************** 2015-6-9 16:01:38 The following code is for HR-HT error elusion ****************/
int init_rst_times_gpio(XGpio *Gpio_rst_times_ptr);
XStatus init_timer(Xuint16 DeviceId, Xuint8 TmrCtrNumber);
void start_timer(Xuint16 DeviceId, Xuint8 TmrCtrNumber);
void init_sys_status(XGpio *Gpio_rst_times_ptr, XGpio *Gpio_245o_ptr);
void peek_sys_status(XGpio *Gpio_245o_ptr);
/****************** 2015-6-9 16:01:38 The upper code is for HR-HT error elusion ******************/



#endif /* SHIT_APP_H_ */

